<div class="row">
    <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
        <div class="widget am-cf">
            <div class="widget-head am-cf">
                <div class="widget-title am-cf">数据分析</div>
            </div>
            <div class="widget-body am-fr">
                <div class="page_toolbar am-margin-bottom-xs am-cf">

                    <form id="form-search" class="toolbar-form" action="">
                        <input type="hidden" name="s" value="/<?= $request->pathinfo() ?>">

                        <div class="am-u-sm-12 am-u-md-3">
                            <div class="am-form-group">
                                <div class="am-btn-toolbar">
                                    <div class="am-btn-group am-btn-group-xs">
                                        <?php if (checkPrivilege('operator.agent/export')): ?>
                                            <a class="j-export am-btn am-btn-success am-radius"
                                               href="<?= url('operator.agent/export') ?>">
                                                <i class="iconfont icon-daochu am-margin-right-xs"></i>所有品牌商分润数据导出
                                            </a>
                                        <?php endif; ?>
                                    </div>
                                </div>
                                <div class="am-btn-toolbar">
                                    <div class="am-btn-group am-btn-group-xs">
                                        <?php if (checkPrivilege('operator.agent/allexport')): ?>
                                            <a class="j-export am-btn am-btn-success am-radius"
                                               href="<?= url('operator.agent/allexport') ?>">
                                                <i class="iconfont icon-daochu am-margin-right-xs"></i>所有代理商分润数据导出
                                            </a>
                                        <?php endif; ?>
                                    </div>
                                </div>
                                <div class="am-btn-group am-btn-group-xs">
                                    <i class="iconfont am-margin-right-xs">平台分润：<?= $plant ?>  元</i>
                                </div>
                            </div>
                        </div>
                        
                        <div class="am-u-sm-12 am-u-md-9" style="float: right">
                            <div class="am fr">

                                <div class="am-form-group am-fl">
                                    <div class="am-input-group am-input-group-sm tpl-form-border-form">
                                        <input type="text" class="am-form-field" name="search"
                                               placeholder="请输入品牌商名称" value="<?= $request->get('search') ?>">
                                        <div class="am-input-group-btn">
                                            <button class="am-btn am-btn-default am-icon-search"
                                                    type="submit"></button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="am-u-sm-12">
                    <table width="100%" class="am-table am-table-compact am-table-striped tpl-table-black ">
                        <thead>
                        <tr>
                            <th>品牌商ID</th>
                            <th>品牌商名称</th>
                            <th>品牌商电话</th>
                            <th>品牌商分润</th>
                            <th>运营商个数</th>
                            <th>合伙人个数</th>
                            <th>商家个数(直推)</th>
                            <th>商家个数(员工推荐)</th>
                            <th>添加时间</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>

                        <?php if (!$list->isEmpty()): foreach ($list as $item): ?>
                            <tr>
                                <td class="am-text-middle">
                                    <p class="item-title"><?= $item['agent_id'] ?></p>
                                </td>
                                <td class="am-text-middle">
                                    <p class="item-title"><?= $item['company_name'] ?></p>
                                </td>
                                <td class="am-text-middle">
                                    <p class="item-title"><?= $item['company_tel'] ?></p>
                                </td>
                                <td class="am-text-middle">
                                    <p class="item-title"><?= $item['agentmoney'] ?></p>
                                </td>
                                <td class="am-text-middle">
                                    <p class="item-title"><?= $item['maxganet'] ?></p>
                                </td>
                                <td class="am-text-middle">
                                    <p class="item-title"><?= $item['minganet'] ?></p>
                                </td>
                                <td class="am-text-middle">
                                    <p class="item-title"><?= $item['agentstore'] ?></p>
                                </td>
                                <td class="am-text-middle">
                                    <p class="item-title"><?= $item['clerk_num'] ?></p>
                                </td>

                                <td class="am-text-middle"><?= $item['create_time'] ?></td>
                                <td class="am-text-middle">
                                    <div class="tpl-table-black-operation">


                                        <a href="<?= url('operator.agent/one', ['agent_id' => $item['agent_id']]) ?>"
                                           class="j-move" data-id="<?= $item['agent_id'] ?>" target="_blank">
                                            <i class="am-icon-arrow-right"></i> 查看运营商
                                        </a>
                                        <a href="<?= url('operator.agent/tow', ['agent_id' => $item['agent_id']]) ?>"
                                           class="j-move" data-id="<?= $item['agent_id'] ?>" target="_blank">
                                            <i class="am-icon-arrow-right"></i> 查看合伙人
                                        </a>

                                    </div>
                                </td>

                            </tr>
                        <?php endforeach; else: ?>
                            <tr>
                                <td colspan="4" class="am-text-center">暂无记录</td>
                            </tr>
                        <?php endif; ?>
                        </tbody>
                    </table>
                </div>
                <div class="am-u-lg-12 am-cf">
                    <div class="am-fr"><?= $list->render() ?> </div>
                    <div class="am-fr pagination-total am-margin-right">
                        <div class="am-vertical-align-middle">总记录：<?= $list->total() ?></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


